﻿#pragma once

#ifndef ARD__THREAD__H
#define ARD__THREAD__H

#include <functional>

///线程类
///
class Thread
{
public:
	using ThreadFunc = std::function<void(int)>;
	Thread(ThreadFunc func);
	~Thread() = default;
	///启动线程
	void start();
	///获取线程ID
	int getId() const;
private:
	ThreadFunc _func;
	/// 线程ID生成器
	static int _generateId;
	int _threadId;
};



#endif // ARD__THREAD__H
